#include "RecipeManager.h"
#include "Recipe.h"

RecipeManager::RecipeManager() {
	m_recipes = new std::vector<Recipe*>();
	for(int i = 0; i < NUM_RECIPE_TYPES; i++) {
		m_recipes->push_back(new Recipe(RecipeType(i)));
	}
}

RecipeManager::~RecipeManager() {
	for(int i = 0; i < NUM_RECIPE_TYPES; i++) {
		delete m_recipes->at(i);
	}
	delete m_recipes;
}

Recipe* RecipeManager::getRecipe(int recipe) const {
	if(recipe >= 0 && recipe < NUM_RECIPE_TYPES)
		return m_recipes->at(recipe);
	return NULL;
}